package com.laoyang.dtp;

import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author:Kevin
 * @create: 2023-10-24 22:29
 * @Description:    线程安全的ConcurrentHashMap
 */

public class DtpUtil {

//    public static ConcurrentHashMap<String,DtpExecutor> map = new ConcurrentHashMap<>();
    public static HashMap<String,DtpExecutor> map = new HashMap<>();

    public static void set(String name,DtpExecutor dtpExecutor){
        map.put(name,dtpExecutor);
    }

    public static DtpExecutor get(String name) {
        return map.get(name);
    }

}
